<template>
    <div>
        <h1>
            {{title}}
        </h1>
        <div v-for="item in goods">
            <h3>{{item.title}}</h3>
            <p>价格:{{item.price}}</p>
            <p>数量:{{item.num}}</p>
        </div>
        <button @click="myClick">点击</button>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                title:"商品列表",
                goods:[
                {
                        title:"鞋子",
                        price:200,
                        num:1
                    },
                    {
                        title:"鞋子",
                        price:200,
                        num:1
                    },
                    {
                        title:"鞋子",
                        price:200,
                        num:1
                    },
                    {
                        title:"鞋子",
                        price:200,
                        num:1
                    },
                    {
                        title:"鞋子",
                        price:200,
                        num:1
                    },
                    {
                        title:"鞋子",
                        price:200,
                        num:1
                    }
                ]
            }
        },
        methods: {
            myClick(){
                console.log(666);
            }
        },
    }
</script>

<style scoped>

</style>